package com.book.bookmanage.controller;

import com.book.bookmanage.mapper.BookMapper;
import com.book.bookmanage.model.entity.Book;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/book")
public class BookController {
    @Resource
    private BookMapper bookMapper;

    @RequestMapping("/getBooks")
    public List<Book> getBooks() {
        return bookMapper.selectList(null);
    }
}
